<?php require_once(dirname(__FILE__).'/inc/config.inc.php');IsModelPriv('goodsorder'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>修改证书</title>
<link href="templates/style/admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/getuploadify.js"></script>
<script type="text/javascript" src="templates/js/checkf.func.js"></script>
<script type="text/javascript" src="plugin/calendar/calendar.js"></script>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="ui/css/bootstrap.min.css">
<link rel="stylesheet" href="ui/css/bootstrap-theme.min.css" >
<script src="/bootstrap/js/bootstrap.min.js" ></script>
<script language="javascript" type="text/javascript" src="DatePicker/WdatePicker.js"></script>
</head>
<body>
<?php
$row = $dosql->GetOne("SELECT * FROM `#@__sn` WHERE `id`=$id");
?>
<div class="formHeader"> <span class="title">修改设备序列号</span> <a href="javascript:location.reload();" class="reload">刷新</a> </div>
<form name="form" id="form" method="post" action="zhengshu_save.php" onsubmit="return cfm_zhengshu();">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable">
    <tr>
    <td width="25%" height="40" align="right">设备类型：<span class="maroon">*</span></td>
    <td>
    <select  class="form-control w300" name="typeid" id="typeid" >
                <?php
						$dosql->Execute("SELECT * FROM  `#@__cascadedata`  WHERE  datagroup='device'   order by orderid asc ");
						while($row2 = $dosql->GetArray())
						{
							
							if ($row['typeid']==$row2['datavalue']){
								$selected = 'selected="selected"';
							}else{
								$selected = '';
							}
							echo '<option data-index="'.$row2['datavalue'].'"  value="'.$row2['datavalue'].'"  '.$selected.' >'.$row2['dataname'].'</option>';
						}
                            ?>
    </select>
    </td>
  </tr>

    
		<tr>
			<td width="25%" height="40" align="right">设备序列号：</td>
			<td width="75%"><b class="red"><?php echo $row['sn']; ?></b></td>
		</tr>
		<tr>
			<td width="25%" height="40" align="right">设备型号：</td>
			<td width="75%"><input type="text" name="typename" class="form-control w300" id="typename" value="<?php echo $row['typename']?>" />
				</td>
		</tr>
<tr >
<td width="25%" height="40" align="right">开始时间：</td>
<td width="75%"><input class="Wdate"  name="beginTime" id="beginTime" type="text" onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'})" value="<?php echo date("Y-m-d",$row['start_time'])?>"> 结束时间： <input class="Wdate" type="text" name="endTime" id="endTime" onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'})" value="<?php echo date("Y-m-d",$row['end_time'])?>"></td>
</tr>
		<tr>
			<td width="25%" height="40" align="right">使用单位：</td>
			<td width="75%"><input type="text" name="school" class="form-control w300" id="school" value="<?php echo $row['school']?>" />
				</td>
		</tr>
		<tr>
			<td height="40" align="right">联系人：</td>
			<td><input type="text" name="truename" class="form-control w300"  id="truename"  value="<?php echo $row['truename']?>" /></td>
		</tr>
		<tr>
			<td height="40" align="right">电话：</td>
			<td><input type="text" name="mobile" class="form-control w300"  id="mobile"  value="<?php echo $row['mobile']?>" />
				<span class="maroon">&nbsp;</span></td>
		</tr>
		<tr>
			<td height="40" align="right">地址：</td>
			<td><input type="text" name="address" class="form-control w300"  id="address"  value="<?php echo $row['address']?>" />
				<span class="maroon">&nbsp;</span></td>
		</tr>
		<tr class="nb">
			<td height="40" align="right">是否出厂：</td>
			<td><input type="radio" name="checkinfo" value="true" <?php if($row['checkinfo'] == 'true'){echo 'checked="checked"';} ?> />
				是 &nbsp;
				<input type="radio" name="checkinfo" value="false" <?php if($row['checkinfo'] == 'false'){echo 'checked="checked"';} ?> />
				否<span class="cnote">选择“否”则该信息暂时不显示在前台</span></td>
		</tr>
	</table>
	<div class="formSubBtn">
		<input type="submit" class="btn btn-danger" value="提交" />
		<input type="button" class="btn btn-default" value="返回" onclick="history.go(-1);" />
		<input type="hidden" name="action" id="action" value="update" />
		<input type="hidden" name="id" id="id" value="<?php echo $id; ?>" />
        <input type="hidden" name="num" id="num" value="<?php echo $row['sn']; ?>" />
	</div>
</form>
</body>
</html>